﻿// =================================================================
//  Copyright (c) "David R. Guindo", Software architect
//  
//  This code is released under the terms of the Apache License, Version 2.0,
//  http://www.apache.org/licenses/LICENSE-2.0
//  
//  THIS CODE AND INFORMATION ARE PROVIDED WITHOUT WARRANTIES,
//  WITHOUT LIMITING COMMERCIAL OR PARTICULAR USE.
// =================================================================

namespace ScreenManagerDemo.Views
{
   using System.Windows;
   using System.Windows.Controls;

   /// <summary>
   ///    Lógica de interacción para View1.xaml
   /// </summary>
   public partial class View
   {
      public View()
         : this(null)
      {
      }

      public View(string info)
      {
         this.InitializeComponent();
         this.tbContent.Text = info;
      }

      private void BtnCloseClick(object sender, RoutedEventArgs e)
      {
         ScreenView.CloseView(WpfHelpers.FindAncestorOrSelf<UserControl>(this));
      }
   }
}